/*
* CEGUIFileFinder.h
* @description: 
*
* @author: GYXiang
* @date: 2009.12.21
*/

#ifndef __CEGUIFileFinder_H__
#define __CEGUIFileFinder_H__

#if _MSC_VER > 1000
#pragma once
#endif

#include "CEGUIElementBase.h"

class CEGUIFileFinder : public CEGUIElementBase
{
public:
	CEGUIFileFinder(CEGUIElementBase * parent, int id, const string& name,
		int offsetX = 0, int offsetY = 0, int width = 190, int height = 100, 
		bool visible = true);

	~CEGUIFileFinder(void);

	void Move(int offsetx, int offsety);

	void SetPosition(int offsetFromParentX, int offsetFromParentY);

	void SetSize(int width, int height);

	void BindFuncBtmOK(void (*fun)());
	void BindFuncBtmCancle(void (*fun)());

    int FindFile(const string& sRootDir, const string& sPostfix = "");
	const string& GetChoosenContent() const;

	HRESULT Render();
	HRESULT Update(float deltaTime);

private:
	CEGUIListBox* m_pListBox;
	CEGUIButton* m_pBtmOK;
	CEGUIButton* m_pBtmCancle;

	void FinalCleanUp();
};

#endif